package com.ruoyi.caiwu.controller;

import com.ruoyi.caiwu.domain.RequestPayManageDto;
import com.ruoyi.caiwu.domain.ResponsePayManageDto;
import com.ruoyi.caiwu.service.CwPaymentPlanService;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.common.security.annotation.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/cwPaymentPlan")
@CrossOrigin
public class CwPaymentPlanController extends BaseController {

    @Autowired
    private CwPaymentPlanService cwPaymentPlanService;

    /**
     * 付款计划查询
     */
    @PreAuthorize(hasPermi = "system:contract:list")
    @GetMapping("/getlist")
    public TableDataInfo getlist(RequestPayManageDto RequestPayManageDto)
    {
        startPage();
        List<ResponsePayManageDto> list = cwPaymentPlanService.selectcwPaymentPlanService(RequestPayManageDto);
        return getDataTable(list);
    }
}
